package cn.richard.demo.drools;

import java.time.LocalDateTime;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RuleCtrller {
	@Autowired
    private RuleService ruleService;
	
	@RequestMapping("/hello")
	public String hell() {
		return LocalDateTime.now().toString();
	}
	
    @RequestMapping("/rule/fire")
    public String rule(){
        ruleService.fire();
        return "OK";
    }
}
